package com.lc.communication.controller;

import com.alibaba.fastjson2.JSONObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuhf17
 * @version 1.0.0
 * @ClassName TestController.java
 * @Description TODO
 * @createTime 2024年06月17日 15:25:00
 */
@RestController
public class TestController {
    @GetMapping("/test/test1")
    public Object test(@RequestParam(name = "msg") String msg) {
        JSONObject json = new JSONObject();
        json.put("code",200);
        json.put("msg",msg);
        return json;
    }

    @GetMapping("/test/test2")
    public Object test2(@RequestParam(name = "code") String code,@RequestParam(name = "state") String state) {
        JSONObject json = new JSONObject();
        json.put("code",code);
        json.put("state",state);
        System.out.println("code:"+code+" state:"+state);
        return json;
    }

}
